<?php
//	1.连接Mysql数据库服务器
	$host = "localhost";
	$user = "root";
	$password = "";
	$database = "data";
	$link = mysqli_connect($host,$user,$password);
	if(!$link){
		die("数据库连接失败，原因：". mysqli_connect_error());
	}
//	2.选择数据库
	mysqli_select_db($link,$database);
	mysqli_query($link,"set names utf8");

?>